#include "gtktreeselection.h"
#include "gtktreestore.h"
#include "gtktreeview.h"
+#include "gtklabel.h"
enum
{
GtkTreeStore *model;
GtkTreeView *tree;
+ GtkWidget *object_title;
};
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorObjectHierarchy, gtk_inspector_object_hierarchy, GTK_TYPE_BOX)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/inspector/object-hierarchy.ui");
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorObjectHierarchy, model);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorObjectHierarchy, tree);
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorObjectHierarchy, object_title);
}
void
GHashTableIter hit;
GType *ifaces;
gint i;
+ const gchar *title;
gtk_tree_store_clear (oh->priv->model);
interfaces = g_hash_table_new (g_str_hash, g_str_equal);
type = ((GTypeInstance*)object)->g_class->g_type;
-
+
+ title = (const gchar *)g_object_get_data (object, "gtk-inspector-object-title");
+ gtk_label_set_label (GTK_LABEL (oh->priv->object_title), title);
+
do
{
class_name = g_type_name (type);
</columns>
</object>
<template class="GtkInspectorObjectHierarchy" parent="GtkBox">
- <property name="orientation">horizontal</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="object_title">
+ <property name="visible">True</property>
+ <property name="halign">fill</property>
+ <property name="valign">center</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
+ </object>
+ </child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>